Many computer applications call for the use of random numbers, which are employed to give unpredictability to the behaviour of a program. Many computer platforms provide a so-called random number generator, which is typically a RND(N) function that returns a random number in the range of 0 to N−1 (or sometimes 1 to N). It will be appreciated by those skilled in the art that the word “random” is a misnomer since the random numbers produced are usually created using a linear congruential generator (LCG). An LCG sequence generator calculates a series of numbers, ri, of the form ri+1=F(ri). Successive numbers in the number sequence are a function of previous numbers. If the RND(N) function performs fairly, each invocation of the function should yield values 0 to N−1 with equal probability. Typical, an LCG will have a large period (that is, the sequence will produce a large number of values before it repeats). If an application requires RND(N), where N is relatively small, then the output of the LCG is manipulated to yield a value that lies in the range 0 to N−1. For example, the result of each step of the LCG can be taken to modulo n in order to produce values in the required range. As a consequence, repeated calls of RND(N) can return repetitions of values before N values have been returned.
The DVD-Video specification as published by the DVD Forum supports a random number function, RND[N], to return a random number within a specified range. However, the specification does not contain any explicit technical guidance to implement this function. It is well known within the industry that some manufacturers have implemented the function in a way that their DVD players always generate the same random number sequence. Such a situation can occur when an LCG is seeded with a constant value. Consequently, companies engaged in authoring DVD-Video discs cannot assume that a different random number sequence will be generated each time a disc is played. This is particularly problematical for games, such as quizzes, where, for some devices, it can result in the same question sequence being delivered each time the disc is played.
Another feature of DVD-Video is the counter mode of the GPRM registers. A GPRM can be placed in counter mode such that its value is incremented by one for each elapsed second from the moment the counter mode is invoked. This feature can be used effectively to seed an LCG with a value that is time-dependent and likely to change as between successive plays of a disc. While this may go some way to overcoming the limitation of players that have a deficient RND implementation, some manufacturers have defective implementations of the counter feature such that registers are incorrectly incremented in contrast to the DVD-Video specification requirements. Furthermore, it is known that there are some DVD players that have defective implementations of both the RND function and the counter mode of the GPRMs.
It is an object of embodiments of the present invention at least to mitigate some of the problems of the prior art.